home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Interactive 7
/
PC World Interactive 7.iso
/
program
/
ctutor.exe
/
ANSWERS
/
CH03_2.C
< prev
next >
Wrap
Text File
|
1994-05-15
|
602b
|
33 lines
main()
{
int index;
index = 1;
do {
printf("The count is now %2d",index);
if (index == 3)
printf(" and is equal to three.");
if (index == 7)
printf(" and is equal to seven.");
printf("\n");
index = index + 1;
} while (index < 11);
}
/* Result of execution
The count is now 1
The count is now 2
The count is now 3 and is equal to three.
The count is now 4
The count is now 5
The count is now 6
The count is now 7 and is equal to seven.
The count is now 8
The count is now 9
The count is now 10
*/